package com.ruoyi.core.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author wanghao 913351190@qq.com
 * @create 2022/7/22 9:45
 */
@Data
public class TokenInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    private String userId;
    private String userName;
    /**
     * 0：普通用户；1：管理员
     */
    private String userType;
    private String nickName;

    private String deptId;
    private String deptCode;
    private String deptName;

    private List<RoleInfo> roles;


    @Data
    public static class RoleInfo {
        private String roleId;
        private String roleCode;
        private String roleName;

        public RoleInfo() {
        }

        public RoleInfo(String roleId, String roleName) {
            this.roleId = roleId;
            this.roleName = roleName;
        }
    }


}